package com.easy.bean;
import java.util.Date;

import com.easy.generator.annotation.EasyCascade;
import com.easy.generator.annotation.EasyField;
import com.easy.generator.annotation.FieldType;
import com.easy.generator.annotation.RouterLabel;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
@Data
@TableName("reserve")
@RouterLabel(label="预约管理")
public class Reserve {
    @TableId(value = "id",type = IdType.AUTO)
    private Integer id;
    @TableField(value= "status")
    @EasyField(label = "状态",type = FieldType.Radio)
    private Integer status;
    @TableField(value= "score")
    @EasyField(label = "评分",type = FieldType.Number)
    private Double score;
    @TableField(value= "comment")
    @EasyField(label = "评价",type = FieldType.TextArea)
    private String comment;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value= "comment_time")
    @EasyField(label = "评价时间",type = FieldType.Date)
    private Date commentTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value= "reserve_time")
    @EasyField(label = "预约时间",type = FieldType.Date)
    private Date reserveTime;
    @TableField(value= "course_id")
    private Integer courseId;
    @TableField(exist = false)
    @EasyField(show = true,insert = true,type = FieldType.Select,search = true,label = "课程")
    @EasyCascade(cascade = Course.class,field = "id",cascadeField = "courseId",showField = "name")
    private Course course;
    @TableField(value= "member_id")
    private Integer memberId;
    @TableField(exist = false)
    @EasyField(show = true,insert = true,type = FieldType.Select,search = true,label = "会员")
    @EasyCascade(cascade = Member.class,field = "id",cascadeField = "memberId",showField = "name")
    private Member member;
}
